In mathematical morphology, granulometry is an approach to compute a size distribution of grains in binary images, using a series of morphological opening operations. It was introduced by Georges Matheron in the 1960s, and is the basis for the characterization of the concept of size in mathematical morphology.
Let B be a structuring element in an Euclidean space or grid E, and consider the family , , given by:
where denotes morphological dilation. By convention, is the set containing only the origin of E, and .
Let X be a set (i.e., a binary image in mathematical morphology), and consider the series of sets , , given by:
where denotes the morphological opening.
The granulometry function is the cardinality (i.e., area or volume, in continuous Euclidean space, or number of elements, in grids) of the image :
The pattern spectrum or size distribution of X is the collection of sets , , given by:
The parameter k is referred to as size, and the component k of the pattern spectrum provides a rough estimate for the amount of grains of size k in the image X. Peaks of indicate relatively large quantities of grains of the corresponding sizes.
The above common method is a particular case of the more general approach derived by Matheron.
The French mathematician was inspired by sieving as a means of characterizing size. In sieving, a granular sample is worked through a series of sieves with decreasing hole sizes. As a consequence, the different grains in the sample are separated according to their sizes.
The operation of passing a sample through a sieve of certain hole size "k" can be mathematically described as an operator that returns the subset of elements in X with sizes that are smaller or equal to k. This family of operators satisfy the following properties:
A granulometry-generating family of operators should satisfy the above three axioms.
In the above case (granulometry generated by a structuring element), .
Another example of granulometry-generating family is when , where is a set of linear structuring elements with different directions.